<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png" />
    <!-- 父往值传值 -->
    <abc msg="1321322132132" txt="文本" @test="fn"/>
    

    <son msg="这是父传子二" />
    {{times}}
    <!-- <HelloWorld msg="Welcome to1 Your Vue.js App"/> -->
  </div>
</template>

<script>
// 导入子组件
// import HelloWorld from './components/HelloWorld.vue'
import abc from "./components/son.vue";
import son from "./components/son2.vue";
export default {
  name: "App",
  data() {
    return {
      times:'',
    }
  },
  components: {
    // HelloWorld,
    abc,
    son,
  },
  methods: {
    fn(val){
      this.times=val
      // if(this.times=="这是子组的消息"){
      //   console.log("true")
      // }else{
      //   console.log("false")
      // }
      console.log(val)
    }
  },
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
